#include <stdio.h>

enum DAY
{
  MON = 1,
  TUE,
  WED,
  THU,
  FRI,
  SAT,
  SUN
};

void fn_enum()
{
  enum DAY
  {
    MON = 1,
    TUE,
    WED,
    THU,
    FRI,
    SAT,
    SUN
  } day;
  // 遍历枚举元素
  for (day = MON; day <= SUN; day++)
  {
    printf("枚举元素：%d \n", day);
  }
}

int main()
{
  enum DAY day;
  day = WED;
  printf("%d", day);
  fn_enum();
  return 0;
}

// gcc -o enum.cpp enum.c && ./enum.cpp
// gcc -o enum.exe enum.c && ./enum.exe